Welcome to Physics SE. I am sorry if you have felt like the site is not welcoming to new users, but I think your feelings come from some misunderstandings of how the site works and the intent of its mechanisms, rules, etc.
First, down votes are not personal. A down vote on a question means that a user thinks the question is poorly written, does not follow the site policies/guidelines, etc. A down vote on an answer means that a user thinks the answer is poorly written, not useful to there question it was posted on, does not follow the site policies/guidelines, etc. Up votes and down votes are a mechanism to make sure quality content is viewed and poor content is not viewed for the sake of all users on the site. Without down votes new users to the site might get the wrong impression of what is acceptable on Physics SE. So while down votes are "negative", they are not a violent attack. They are just indications that improvement is needed on the post.
Second, voting to close a question is not personal. This site, like all stack exchange sites (and really most sites on the internet) have guidelines as for what is/is not appropriate for that site. If something is on a site that should not be there, then it should be removed. I understand the desire to want to help all people with all questions, but there are other places on the internet/real life for that. As a loose summary, Physics SE is intended to be a Q&A site for primarily conceptual physics questions. It is not a discussion forum, not a homework help site, not a personal theory checking site, etc. So while closing important questions can be upsetting, it is not a violent action. They are just a way to make sure the site runs as intended, which is what anything on the internet/in real life does.
Third, these measures are not meant to alienate any users. Whenever a question is closed, the close banner explains why the question was closed and what the user needs to do to have a chance to reopen the question. Up votes give more reputation than down votes, so users who obtain down votes can easily "remove" this from their record by just posting good, quality content.
Of course, there are instances where a user is rude, or perhaps too extreme in their language. In this case the best thing to do is flag their comment or answer for a moderator to review. However, users using the mechanisms built into the site discussed above should not be taken in this way, as described above.
To address specific examples in your post:
and then after sometime someone wrote in the comment with an edit of homework exercise tag
" We don't answer homework questions over here, please read the instructions of this site ".
First, the homework-and-exercises tag should be used on all questions that are asking about a homework-like exercise. It doesn't matter if the question was actually assigned as homework for a class or not. Second, the commenting user is exactly correct: this site is not intended to supply homework solutions, and the user asking the question should most definitely read the site guidelines to learn more. The comment you have quoted, while brief, is truthful and not rude at all.
After some 30 minutes, I found that the question was closed. Don't you think we should have told him that you should go to Stackexchange Chats and in a problem-solving strategy room @JohnRennie is there to help you.
This is a great suggestion, and hopefully one you tried to make. However, we sometimes don't advertise the chat rooms as they are not open to all users of the site. But certainly a comment like this is not required, and a lack of it does not mean we are being rude or alienating.
wouldn't it be better to upvote their question just once (1 upvote and that green color would make them happy) and then to teach them why those what if questions are usually condemned.
The point of the site is not to make everyone happy, as this is a subjective and impossible goal. An up vote on a poor question or answer indicates that it is ok to post poor questions and answers. As explained above, down votes are not personal attacks. If a new user takes offense to the mechanisms of the site, or starts lashing out because of it, then that is on them. We can't be worried about how a user will perceive and act upon a down vote.
Some new users even try to write answers (they have relevant information) but since they have never been to a forum where learned men reside they write it very badly and this generally earns them very harsh comments like "how that answers the question" , "I think you shouldn't attempt to write an answer unless you have some relevant info" .
This should actually make you happy here. Usually down votes occur without any comments explaining why the down vote was given. These users here were leaving comments to help explain the down vote (if they did down vote) and how to improve the post. The comments you have quoted are not harsh in my opinion, but as a said before, if you think they are then the best course of action is to flag them.
I want to say why it’s necessary to downvote that answer? Just tell him why his/her answer doesn’t answers the question and his writing style is quite hard to comprehend by others.
Up/down votes make sure good content is more visible and bad content is not. Once again, down votes are not personal, and one should not be worried about how other users will perceive and react to a down vote, as this is an impossible task. More in-depth rationale can be found in this answer.
As for why comments are not sufficient, sometimes users post questions/answers and then don't attend to them for a while. Also, comments are not guaranteed to make the user edit the post to be better. While down votes are not supposed to be a form of coersion, they do indicate to other users that are possibly less familiar with the site that there is an issue. This is much easier and makes more sense than assuming others will comb through comments.
EDIT 2: From all the answers that I have received I can conclude that IGNORANCE OF LAW IS ONE’S OWN PROBLEM.
No one is saying this. I'm not saying we shouldn't help new users learn about the site, suggest improvements to posts, etc. and just leave them to fend for themselves. You seem to still be in this mindset that down votes, closing questions, etc. are offensive and bad. This is not the case.
Something to keep in mind is that it is impossible to avoid offending someone at some point. Additionally, just because someone is offended by something does not mean that the offender is always at fault. I don't think the mechanisms that uphold the quality of the site should be compromised just because certain users will be offended by them or even lash out. In my personal interactions I don't want to offend others, but this is just an internet site devoted to certain types of physics Q&A. The point of this site is not to make sure everyone who uses it always feels happy no matter what.