No. They can not see through the glass but can destroy the glass. So it is safe for someone if they hide inside any glass tunnel for saving themselves from the attack of ghasts.