I've been told by attorneys that applying for the Green Card lottery does not come without risk--in fact it can prevent you from obtaining a non-immigrant visa.
For example, when applying for an F or J visa (student/post-doc, say) the consular officer will ask you if you have intent to emigrate. The only allowed answer is a firm "No and I have permanent connections to my home country."
If you've applied for the green card lottery in the past, the consular officer could interpret this as having intent to emigrate and then deny you on any other non dual-intent visas.