aye, cos if you have a bad diet or dont drink enough water, your stools are harder so you strain more when you are on the toilet. this can often cause them, and certainly make them worse if you already have them. nice healthy poos just shoot right out of you, no problem! so try to eat better lol.
wikipedia should have a good article on hemorrhoids, check it out.