I read your replies below. Forget it, it won't work. You need to own a car on Staten Island and does the SI Ferry run 24/7? If you're budget is $300 - 400K, forget about buying a house. Any house in this price range means it needs at least $100K in renovations / repairs OR it's in a high crime neighborhood and that's just to start.
Your best method with your budget: buy a co-op in Queens, Brooklyn or the Bronx within walking distance to the subway or bus stop and in a safe neighborhood. Another option is the nearby suburbs of Westchester or Nassau Counties. Both suburbs have co-ops within walking distance to the train stations (MetroNorth or Long Island Railroad) and there are buses. Check the schedules to see if the trains run at 1:00AM.
Remember, the safer the neighborhood, the higher the prices for housing.