Hello,
shorts are OK for cycling as others have pointed out. However, I would argue that cultural sensitivity goes a long way. In situations where you think it's appropriate to wear long pants, you should. Take small towns for instance and the like.
Just my two cents ...
Best,
Markus