No, you never need a lawyer to file a patent application. However, it is always advisable to consult with a patent attorney. Software related inventions are very complex, and it would be very difficult for an inventor to get a patent without the help of a patent attorney.