Yes, you can clean your engine bay with water. Using water on the engine, on the other hand, is not suggested since water can leak into electrical components, causing a new set of problems.  If you want to use water, don't use high-pressure water or a power washer because this can hurt the engine.  Instead, softly spray the engine with a garden hose to get rid of any dirt or debris.