There are many ways to do it. I guess I should write a tutorial on this at some point cause people keep asking . . . that and robot arms . . .
Anyway so cameras actually transmit a matrix of pixels. Each pixel stores information, usually RBG of each pixel. A combination of red, blue, and green colors.
extra reading if interested here RBG and the human eye http://biology-web.nmsu.edu/vince/course.on.color.pdf#search=%22rbg%20color%20theory%20pixel%22
list of RBG colors http://local.wasp.uwa.edu.au/~pbourke/colour/colourspace/
The way I would solve your problem is first find a max brightness level. This means to search every pixel and record just the max pixel. This is the same as searching a matrix and finding the max value.
For example, if you had a theoretical 8 pixel camera and you just wanted to find green brightness:
green camera values from an image: 10 38 230 100 200 245 120 57
Your search would then find 245 as the max value. This is the very brightness spot in the image. The X-Y coordinates of that pixel is where it is. But this is susceptible to noise, so what you want is not the brightest pixel bright but the brightest area. Now what you need is a threshold.
Arbitrary threshold constant = top 10% brightest = .9
So now multiple that number by the brighest pixel -> 245*.9 = 221
Now search through the matrix again and find all pixels above 221, and record the X-Y positions of each of those pixels. The average location of all the pixels is the location of the top 10% brightest green spots in your camera image.
But then again it gets more complicated if you have two bright objects in different locations of equal brightness . . . but I wont go into that . . .
note: there is a chance I am dumb and that 255 is dark and 0 is light, but Im too lazy to look it up . . . anyway the concept is the same, just search for the min instead of the max . . .