First you will need a solver, that is a program, which determines, if a given sudoku has a unique solution. This is the easy part. I dont know, what progam language you use, but you have good chances to find sample source codes in the
Solver programs forum here.
Then you can write a program to create sudokus. There are different approaches for this. E.g. you can start with an empty grid and (randomly) add numbers, until it is unique or does not have solution. In the scond case you would remove numbers and try again etc. Or you calculate a random solution grid and (randomly) drop numbers, as long as it has that one solution (maybe the easiest way). Or something between. Or you can fix a pattern and fill it randomly with numbers, until you get one with a unique solution.
Then you should implement a program, that tries to solve puzzles with some basic techniques like singles, pairs, triples, box interactions etc. to be able to see, which of your puzzles are easy (the most), medium etc.
I hope this helps for a start. If you have specific questions, just ask.