Found this useful code snippet to download an attachment from sharepoint list.
SPWeb site = SPContext.Current.Web;
SPFolder folder = site.Folders[“Lists”].SubFolders[“Your List”].SubFolders[“Attachments”].SubFolders[item.ID.ToString()];
foreach (SPFile file in folder.Files)
{
byte[] imageFile = file.OpenBinary();
FileStream fstream = System.IO.File.Create(@”c:\test\image1.png”);
fstream.Write(imageFile, 0, imageFile.Length);
fstream.Flush();
fstream.Close();
}