I can travel where are no molecules,but never through a brick.I can travel through space,but never around a corner.What am I?

Light.

You are a beam of light or a photon. As light, you can travel in a vacuum where there are no molecules, but you cannot pass through a solid object like a brick. Light can travel through the vastness of space, but it follows a straight path and cannot go around corners.

Based on the information provided, the answer to the riddle is "sound."

Explanation:
Sound waves are able to travel through a vacuum, where there are no molecules, such as in outer space. However, sound waves cannot pass through solid objects like a brick. Additionally, sound waves are unable to bend around corners and instead travel in a straight line until they encounter an obstacle.